package by.android.khan.authorization;

import org.scribe.builder.api.DefaultApi10a;
import org.scribe.model.Token;

public class KhanAcademyAPI extends DefaultApi10a {

	private static final String AUTHORIZATION_URL = "http://www.khanacademy.org/api/auth/authorize?oauth_token=%s";
	@Override
	public String getAccessTokenEndpoint() {
		return "http://www.khanacademy.org/api/auth/access_token";
	}

	public String getAuthorizationUrl(Token token) {
		return String.format(AUTHORIZATION_URL, token.getToken());
	}

	@Override
	public String getRequestTokenEndpoint() {
		return "http://www.khanacademy.org/api/auth/request_token";
	}


}
